﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;

namespace Jackie.Silverliight.SetpBySetp
{
    public partial class DataBindPage : Page
    {
        private User user;

        public DataBindPage()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            user.Name = "韩甲友";
            user.Address = "中国，厦门";
        }

        private void DataBind_Loaded(object sender, RoutedEventArgs e)
        {
            user = new User();
            user.Name = "JackieHan";
            user.Address = "Ximen,China";
            DataBind.tbName.DataContext = user;
            DataBind.tbAddress.DataContext = user;
        }

    }
}
